package com.yuan.service.impl;

import com.yuan.entity.Product;
import com.yuan.mapper.ProductMapper;
import com.yuan.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ProductServiceImpl implements ProductService {
    @Autowired
    private ProductMapper productMapper;
    @Override
    public List<Product> findAll() {
        return productMapper.findAll();
    }

    @Override
    public Product findByProductId(String productId) {
        return productMapper.selectByPrimaryKey(productId);
    }
}
